<?php
/**
 * Get request
 *
 * @author     Mario Schillermann <info@rockit-flash.com>
 * @encoding   UTF-8 äöüßÖÄÜ
 * @copyright  © 2011 Mario Schillermann (info@rockit-flash.com)
 * @license    GNU GPL v2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 * @uses
 * @category   Library
 * @package    App
 * @subpackage Model
 * @todo
 */
class App_Model_Request
{
    /**
     * Front controller
     * 
     * @var Zend_Controller_Front
     */
    protected $_frontController = null;

    /**
     * Get current app
     * 
     * @return string
     */
    public function getCurrentApp()
    {
        return $this->getRequest()->getParam("app");
    }
    
    /**
     * Get current tab
     * 
     * @return string
     */
    public function getCurrentTab()
    {
        return $this->getRequest()->getParam("tab");
    }
    
    /**
     * Get front controller
     * 
     * @return array Module list
     */
    public function getFrontController()
    {
        if ($this->_frontController === null) {
            $this->setFrontController();
        }
        return $this->_frontController;
    }
    
    public function getRequest()
    {
        return $this->getFrontController()->getRequest();
    }
    
    /**
     * Set front controller
     * 
     * @return void
     */
    public function setFrontController()
    {
        $this->_frontController = Zend_Controller_Front::getInstance();
    }
}